<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Dissasemble: src/process/decode/decode.c File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="Hopper_v3.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Dissasemble
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">This project receives as input a file.o and displays the assembly code for that object.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('decode_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">src/process/decode/decode.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="decode_8h_source.html">decode.h</a>&quot;</code><br/>
<code>#include &lt;<a class="el" href="common_8h_source.html">common.h</a>&gt;</code><br/>
<code>#include &lt;<a class="el" href="my_lib_8h_source.html">myLib.h</a>&gt;</code><br/>
<code>#include &quot;<a class="el" href="ins_parser_8h_source.html">process/instructionRefParser/insParser.h</a>&quot;</code><br/>
</div><div class="textblock"><div class="dynheader">
Include dependency graph for decode.c:</div>
<div class="dyncontent">
<div class="center"><img src="decode_8c__incl.png" border="0" usemap="#src_2process_2decode_2decode_8c" alt=""/></div>
<map name="src_2process_2decode_2decode_8c" id="src_2process_2decode_2decode_8c">
<area shape="rect" id="node3" href="decode_8h.html" title="decode.h" alt="" coords="453,160,528,189"/><area shape="rect" id="node33" href="common_8h.html" title="common.h" alt="" coords="5,237,88,267"/><area shape="rect" id="node36" href="my_lib_8h.html" title="myLib.h" alt="" coords="981,160,1048,189"/><area shape="rect" id="node38" href="ins_parser_8h.html" title="process/instructionRefParser/insParser.h" alt="" coords="679,83,940,112"/><area shape="rect" id="node5" href="config_8h.html" title="config.h" alt="" coords="564,315,631,344"/><area shape="rect" id="node7" href="debug_8h.html" title="debug.h" alt="" coords="213,237,280,267"/></map>
</div>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_c_o_d_e___f_o_r___o_p___t_y_p_e.html">CODE_FOR_OP_TYPE</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure containing the code and size of an operation according its type.  <a href="struct_c_o_d_e___f_o_r___o_p___t_y_p_e.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structs___addressing_method.html">s_AddressingMethod</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure containing the Addressing method of an operation.  <a href="structs___addressing_method.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structs___prefix_descriptor.html">s_PrefixDescriptor</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure containing the prefixes to be identified within a statement.  <a href="structs___prefix_descriptor.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structs__decoding.html">s_decoding</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure containing information of a decoded instruction.  <a href="structs__decoding.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#af43580ec538f6fc237691eb3a926a93d">determineByteFunction</a> (char *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function that determines the processing functionality byte.  <a href="#af43580ec538f6fc237691eb3a926a93d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a419f00430cb5dcfe8a8955ae1635d448">prepareForNextInstruction</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">The system is prepared to analyze the NEXT instruction.  <a href="#a419f00430cb5dcfe8a8955ae1635d448"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#ac525e2da5428fe38de67b0435b335da7">numberOfOperands</a> (char opcode)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a28978647f0e4c8eda225fa54b5ab2e75">isInNoOPList</a> (<a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> op)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify that the operation code is not in the list of no operators.  <a href="#a28978647f0e4c8eda225fa54b5ab2e75"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="decode_8h.html#a92993569a1c5366c0406b371545e2f43">REG_VALUES</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#aa1cc69f916419120ea6e64ad9255ade5">getRegister</a> (<a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> value, <a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> <a class="el" href="my_obj_dump_8c.html#a1e1268d164c38e4f8a4f4eb9058b0601">size</a>)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the corresponding register according the value and size.  <a href="#aa1cc69f916419120ea6e64ad9255ade5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a8a02f8d66e234d84ae58c1716bd928c2">getSizeOfOperand</a> (<a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *opType, <a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *opAddrMode)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the operand size according to the operation type and addressing method.  <a href="#a8a02f8d66e234d84ae58c1716bd928c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#aefac88ccd9dc9f4fb1f79dcdee540c2e">hasExntesion</a> (char byte, char *list)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify in the instruction has extensions.  <a href="#aefac88ccd9dc9f4fb1f79dcdee540c2e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a7771adca38a9f9707ddbb29664038945">getSizeOfInstruction</a> (<a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the instruction size according to the attribute analysis.  <a href="#a7771adca38a9f9707ddbb29664038945"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a820c8ac2db0636187c27ec47f668bed4">decodeOneByteOpcode</a> (char *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process that analyzes and disassembles instructions with one byte opcode.  <a href="#a820c8ac2db0636187c27ec47f668bed4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a312a131cc979ec89426f810e3faf0d94">decodePrefix</a> (char *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process that analyzes and identifies prefixes into the instruction analyzed.  <a href="#a312a131cc979ec89426f810e3faf0d94"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a2baf0b2b6a468b9e08f84c32cec7ae71">decodeTwoByteOpcode</a> (char *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process that analyzes and disassembles instructions with two byte opcode.  <a href="#a2baf0b2b6a468b9e08f84c32cec7ae71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a463b6c6d26f3cd0ec7f69dbed460681b">isPrefix</a> (<a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *buf)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Process that analyzes and identifies if buf is a prefix.  <a href="#a463b6c6d26f3cd0ec7f69dbed460681b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a3297beb269c3c0ed6a8e226861488785">decode</a> (char *buf, <a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> *decodedSize, <a class="el" href="common_8h.html#a66e747e261292e6aa8b1428bbc5957f7">MACHINE_INSTRUCTION</a> *instructionDecoded)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">State machine that controls the disassembly process.  <a href="#a3297beb269c3c0ed6a8e226861488785"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a434fe20f31a4c47e314f8326f6a31d21">gBuf</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Global Buffer containing the instruction to be processed.  <a href="#a434fe20f31a4c47e314f8326f6a31d21"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#a69afa2e50b905f4eab1f2df8a3fd9f23">UINT32</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a513933770d2ecd9754fbb67a790bdb45">gAddress</a> = 0</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Address to be access.  <a href="#a513933770d2ecd9754fbb67a790bdb45"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs___addressing_method.html">s_AddressingMethod</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a815b93624003eeec418bd4d3da2bf2ef">AddresingMethodList</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of addressing methods available.  <a href="#a815b93624003eeec418bd4d3da2bf2ef"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs___prefix_descriptor.html">s_PrefixDescriptor</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#aa93c1548ecbcf7220917fcbefb596d5e">PrefixDescriptionList</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array of prefix options.  <a href="#aa93c1548ecbcf7220917fcbefb596d5e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="decode_8h.html#a92993569a1c5366c0406b371545e2f43">REG_VALUES</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a2c6bbca72cf3a579cdad52052a3ab14e">reg_values_list</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing the different record types according to their size.  <a href="#a2c6bbca72cf3a579cdad52052a3ab14e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="structs__decoding.html">s_decoding</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a388828f2fe3264d3ff04dd759c45e3e7">decodeMachine</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">State machine.  <a href="#a388828f2fe3264d3ff04dd759c45e3e7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#a29379ff4587818005d5ef90dae5bd1e8">OneByteExtensionInstructions</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing one byte instruction codes.  <a href="#a29379ff4587818005d5ef90dae5bd1e8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#acc808ea0dbac196a90bb83ea709f16a1">TwoByteExtensionInstructions</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing one byte instruction codes.  <a href="#acc808ea0dbac196a90bb83ea709f16a1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#aad37bd4dc0860c7ea795072799faaff5">noOpList</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing the hexadecimal are not considered opcode.  <a href="#aad37bd4dc0860c7ea795072799faaff5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_c_o_d_e___f_o_r___o_p___t_y_p_e.html">CODE_FOR_OP_TYPE</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8c.html#ab9dafaeb644341185d2545f64b1b8d65">operandTypeCodes</a> []</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Array containing the attributes of the different operand types.  <a href="#ab9dafaeb644341185d2545f64b1b8d65"></a><br/></td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a3297beb269c3c0ed6a8e226861488785"></a><!-- doxytag: member="decode.c::decode" ref="a3297beb269c3c0ed6a8e226861488785" args="(char *buf, UINT8 *decodedSize, MACHINE_INSTRUCTION *instructionDecoded)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8h.html#ad9d02712baa4494872edd1c26b3b73ee">decode</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> *&#160;</td>
          <td class="paramname"><em>decodedSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="common_8h.html#a66e747e261292e6aa8b1428bbc5957f7">MACHINE_INSTRUCTION</a> *&#160;</td>
          <td class="paramname"><em>instructionDecoded</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>State machine that controls the disassembly process. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
    <tr><td class="paramname">decodedSize</td><td>Size of the instruction to be decoded </td></tr>
    <tr><td class="paramname">instructionDecoded</td><td>Object containing the attibutes of the decoded instruction </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a820c8ac2db0636187c27ec47f668bed4"></a><!-- doxytag: member="decode.c::decodeOneByteOpcode" ref="a820c8ac2db0636187c27ec47f668bed4" args="(char *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a820c8ac2db0636187c27ec47f668bed4">decodeOneByteOpcode</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Process that analyzes and disassembles instructions with one byte opcode. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a312a131cc979ec89426f810e3faf0d94"></a><!-- doxytag: member="decode.c::decodePrefix" ref="a312a131cc979ec89426f810e3faf0d94" args="(char *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a312a131cc979ec89426f810e3faf0d94">decodePrefix</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Process that analyzes and identifies prefixes into the instruction analyzed. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2baf0b2b6a468b9e08f84c32cec7ae71"></a><!-- doxytag: member="decode.c::decodeTwoByteOpcode" ref="a2baf0b2b6a468b9e08f84c32cec7ae71" args="(char *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a2baf0b2b6a468b9e08f84c32cec7ae71">decodeTwoByteOpcode</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Process that analyzes and disassembles instructions with two byte opcode. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af43580ec538f6fc237691eb3a926a93d"></a><!-- doxytag: member="decode.c::determineByteFunction" ref="af43580ec538f6fc237691eb3a926a93d" args="(char *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="decode_8c.html#af43580ec538f6fc237691eb3a926a93d">determineByteFunction</a> </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Function that determines the processing functionality byte. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aa1cc69f916419120ea6e64ad9255ade5"></a><!-- doxytag: member="decode.c::getRegister" ref="aa1cc69f916419120ea6e64ad9255ade5" args="(UINT8 value, UINT8 size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#aa1cc69f916419120ea6e64ad9255ade5">getRegister</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a>&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a>&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the corresponding register according the value and size. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Register value </td></tr>
    <tr><td class="paramname">size</td><td>Register size </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a7771adca38a9f9707ddbb29664038945"></a><!-- doxytag: member="decode.c::getSizeOfInstruction" ref="a7771adca38a9f9707ddbb29664038945" args="(INT8 *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a7771adca38a9f9707ddbb29664038945">getSizeOfInstruction</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the instruction size according to the attribute analysis. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8a02f8d66e234d84ae58c1716bd928c2"></a><!-- doxytag: member="decode.c::getSizeOfOperand" ref="a8a02f8d66e234d84ae58c1716bd928c2" args="(INT8 *opType, INT8 *opAddrMode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a8a02f8d66e234d84ae58c1716bd928c2">getSizeOfOperand</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *&#160;</td>
          <td class="paramname"><em>opType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *&#160;</td>
          <td class="paramname"><em>opAddrMode</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets the operand size according to the operation type and addressing method. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">opType</td><td>Operation type </td></tr>
    <tr><td class="paramname">opAddrMode</td><td>Addressing method </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aefac88ccd9dc9f4fb1f79dcdee540c2e"></a><!-- doxytag: member="decode.c::hasExntesion" ref="aefac88ccd9dc9f4fb1f79dcdee540c2e" args="(char byte, char *list)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#aefac88ccd9dc9f4fb1f79dcdee540c2e">hasExntesion</a> </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>byte</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>list</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Verify in the instruction has extensions. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">byte</td><td></td></tr>
    <tr><td class="paramname">list</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a28978647f0e4c8eda225fa54b5ab2e75"></a><!-- doxytag: member="decode.c::isInNoOPList" ref="a28978647f0e4c8eda225fa54b5ab2e75" args="(UINT8 op)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a28978647f0e4c8eda225fa54b5ab2e75">isInNoOPList</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a>&#160;</td>
          <td class="paramname"><em>op</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Verify that the operation code is not in the list of no operators. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">op</td><td>Operation code </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a463b6c6d26f3cd0ec7f69dbed460681b"></a><!-- doxytag: member="decode.c::isPrefix" ref="a463b6c6d26f3cd0ec7f69dbed460681b" args="(INT8 *buf)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a463b6c6d26f3cd0ec7f69dbed460681b">isPrefix</a> </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a> *&#160;</td>
          <td class="paramname"><em>buf</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Process that analyzes and identifies if buf is a prefix. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">buf</td><td>Buffer containing the piece of the file to be analyzed </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac525e2da5428fe38de67b0435b335da7"></a><!-- doxytag: member="decode.c::numberOfOperands" ref="ac525e2da5428fe38de67b0435b335da7" args="(char opcode)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="decode_8c.html#ac525e2da5428fe38de67b0435b335da7">numberOfOperands</a> </td>
          <td>(</td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>opcode</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a419f00430cb5dcfe8a8955ae1635d448"></a><!-- doxytag: member="decode.c::prepareForNextInstruction" ref="a419f00430cb5dcfe8a8955ae1635d448" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8c.html#a419f00430cb5dcfe8a8955ae1635d448">prepareForNextInstruction</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The system is prepared to analyze the NEXT instruction. </p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a815b93624003eeec418bd4d3da2bf2ef"></a><!-- doxytag: member="decode.c::AddresingMethodList" ref="a815b93624003eeec418bd4d3da2bf2ef" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structs___addressing_method.html">s_AddressingMethod</a> <a class="el" href="decode_8c.html#a815b93624003eeec418bd4d3da2bf2ef">AddresingMethodList</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array of addressing methods available. </p>

</div>
</div>
<a class="anchor" id="a388828f2fe3264d3ff04dd759c45e3e7"></a><!-- doxytag: member="decode.c::decodeMachine" ref="a388828f2fe3264d3ff04dd759c45e3e7" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structs__decoding.html">s_decoding</a> <a class="el" href="decode_8c.html#a388828f2fe3264d3ff04dd759c45e3e7">decodeMachine</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>State machine. </p>

</div>
</div>
<a class="anchor" id="a513933770d2ecd9754fbb67a790bdb45"></a><!-- doxytag: member="decode.c::gAddress" ref="a513933770d2ecd9754fbb67a790bdb45" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="common_8h.html#a69afa2e50b905f4eab1f2df8a3fd9f23">UINT32</a> <a class="el" href="decode_8c.html#a513933770d2ecd9754fbb67a790bdb45">gAddress</a> = 0</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Address to be access. </p>

</div>
</div>
<a class="anchor" id="a434fe20f31a4c47e314f8326f6a31d21"></a><!-- doxytag: member="decode.c::gBuf" ref="a434fe20f31a4c47e314f8326f6a31d21" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="common_8h.html#a7e125472d65b57f10905accbed140b99">INT8</a>* <a class="el" href="decode_8c.html#a434fe20f31a4c47e314f8326f6a31d21">gBuf</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Global Buffer containing the instruction to be processed. </p>

</div>
</div>
<a class="anchor" id="aad37bd4dc0860c7ea795072799faaff5"></a><!-- doxytag: member="decode.c::noOpList" ref="aad37bd4dc0860c7ea795072799faaff5" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="common_8h.html#ad8ce12d83f204245685f98caf9d03944">UINT8</a> <a class="el" href="decode_8c.html#aad37bd4dc0860c7ea795072799faaff5">noOpList</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">
{ 0x50, 0x58, 0x90, 0xb0, 0xb8 }
</pre></div>
<p>Array containing the hexadecimal are not considered opcode. </p>

</div>
</div>
<a class="anchor" id="a29379ff4587818005d5ef90dae5bd1e8"></a><!-- doxytag: member="decode.c::OneByteExtensionInstructions" ref="a29379ff4587818005d5ef90dae5bd1e8" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="decode_8c.html#a29379ff4587818005d5ef90dae5bd1e8">OneByteExtensionInstructions</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">
{ 0x50, 0x58, 0x90, 0xb0, 0xb8, <span class="charliteral">&#39;\0&#39;</span> }
</pre></div>
<p>Array containing one byte instruction codes. </p>

</div>
</div>
<a class="anchor" id="ab9dafaeb644341185d2545f64b1b8d65"></a><!-- doxytag: member="decode.c::operandTypeCodes" ref="ab9dafaeb644341185d2545f64b1b8d65" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_c_o_d_e___f_o_r___o_p___t_y_p_e.html">CODE_FOR_OP_TYPE</a> <a class="el" href="decode_8c.html#ab9dafaeb644341185d2545f64b1b8d65">operandTypeCodes</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array containing the attributes of the different operand types. </p>

</div>
</div>
<a class="anchor" id="aa93c1548ecbcf7220917fcbefb596d5e"></a><!-- doxytag: member="decode.c::PrefixDescriptionList" ref="aa93c1548ecbcf7220917fcbefb596d5e" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structs___prefix_descriptor.html">s_PrefixDescriptor</a> <a class="el" href="decode_8c.html#aa93c1548ecbcf7220917fcbefb596d5e">PrefixDescriptionList</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array of prefix options. </p>

</div>
</div>
<a class="anchor" id="a2c6bbca72cf3a579cdad52052a3ab14e"></a><!-- doxytag: member="decode.c::reg_values_list" ref="a2c6bbca72cf3a579cdad52052a3ab14e" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="decode_8h.html#a92993569a1c5366c0406b371545e2f43">REG_VALUES</a> <a class="el" href="decode_8c.html#a2c6bbca72cf3a579cdad52052a3ab14e">reg_values_list</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Array containing the different record types according to their size. </p>

</div>
</div>
<a class="anchor" id="acc808ea0dbac196a90bb83ea709f16a1"></a><!-- doxytag: member="decode.c::TwoByteExtensionInstructions" ref="acc808ea0dbac196a90bb83ea709f16a1" args="[]" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char <a class="el" href="decode_8c.html#acc808ea0dbac196a90bb83ea709f16a1">TwoByteExtensionInstructions</a>[]</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<b>Initial value:</b><div class="fragment"><pre class="fragment">
{ 0xc8 }
</pre></div>
<p>Array containing one byte instruction codes. </p>

</div>
</div>
</div><!-- contents -->
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="decode_8c.html">decode.c</a>      </li>

    <li class="footer">Generated on Thu Oct 11 2012 12:32:08 for Dissasemble by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.6.1 </li>
   </ul>
 </div>


</body>
</html>
